<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    /*    //循环打印出来1-100的值
        var i=0;
        while(i<=100){
         console.log(i);
         i++;

        }  */

        var sum=0;
        var i=0;
       while(i<=100){
        sum+=i;
        i++;
       }
       console.log(sum);
     
        
    </script>
</body>
</html>